<?php 
class ProfilenseignantModel extends CI_Model {
    
    public $nom='';
    public $prenom='';
    public $ville='';
    //var $listeFormation="";

    
    function setNom()
    {       
        $this->nom   = $this->session->userdata('nomEnseignant');
        $this->prenom   = $this->session->userdata('prenomEnseignant');
        $this->ville   = $this->session->userdata('villeEnseignant');
    }
    
    function getData()
    {        
        return array(
            'nom'=>$this->nom,
            'prenom'=> $this->prenom,
            'ville'=> $this->ville);
    }
    
  function getnom($login,$password)
    {

        $this->db->select('idenseignant, nom, prenom, ville, mail');
        $this->db->from('user');
        $this->db->where('idenseignant',$login);
        $this->db->limit(1);
    
        $query=$this->db->get();

    if($query->num_rows()==1):
        return $query->result();
    
    else:
        return false;
    endif;
}
}
